package menu;

import com.haois.mp.database.util.ChineseCalendar;
import com.haois.mp.database.util.jx.DateUtil;
import com.haois.mp.wechat.server.AbstractMoreInfoServer;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Value;

import java.lang.reflect.Method;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by RuiHaoZ on 2017/12/14 18:09
 */
public class Profie {

    private String te = "";

    @Test
    public void set() {
        try {
            AbstractMoreInfoServer moreInfoServer = null;
            //Class<AbstractMoreInfoServer> classZ = (Class<AbstractMoreInfoServer>) Class.forName("mp.wechat.handler.search.Logout" + "ServerImpl");
            //moreInfoServer = classZ.newInstance();
            Method method = DateUtil.class.getMethod("isThisMonth", new Class[]{long.class});
            System.out.println(method.invoke(DateUtil.class, new Object[]{new Date().getTime()}));
        } catch (Exception e) {
            e.printStackTrace();
        }

        System.out.println(te);
    }

    @Test
    public void te() {
        Calendar calendar = Calendar.getInstance();
        int y = calendar.get(Calendar.YEAR);
        int m = calendar.get(Calendar.MONTH);
        int d = calendar.get(Calendar.DAY_OF_MONTH);
        ChineseCalendar chineseCalendar = new ChineseCalendar(true, y, m, d);
        ChineseCalendar chineseCalendar1 = new ChineseCalendar(true, 2018, 8, 4);
        System.out.println(chineseCalendar.getSimpleGregorianDateString());
        System.out.println(chineseCalendar1.getSimpleGregorianDateString());
    }

    public void teInTime() {
        Calendar calendar = Calendar.getInstance();
        calendar.set(2018,8,5);
    }
}
